//
//  ARTRequestModel.m
//  ChartsDemo
//
//  Created by yunda on 2021/10/14.
//

#import "ARTRequestModel.h"

@implementation ARTRequestModel

- (instancetype)initWithMethod:(NSString *)method{
    self = [super init];
    if (!self) {
        return nil;
    }
    // code
    _method = method;
    _URLString = [NSString stringWithFormat:@"%@/%@",kRequestHost,method];
    _requestType = ARTRequestTypePost;
    return self;
}

- (NSString *)description{
    NSString *des = [NSString stringWithFormat:@"地址=%@,\n类型=%@,\n参数=%@",self.URLString,self.requestType == ARTRequestTypeGet ? @"GET" : @"POST",self.parameter];
    return des;
}

@end
